package com.cema.manage.project.manage.configuration.domain;

import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;

import java.io.Serializable;
import java.util.Date;

/**
 * 常规配置表 biz_configuration
 *
 * @author reasahi
 * @date 2024-07-22
 */
@TableName(value = "biz_configuration")
public class Configuration extends Model<Configuration> {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id")
    private Integer id;
    /**
     * Key值
     */
    @TableField(value = "key")
    private String key;
    /**
     * Value值
     */
    @TableField(value = "value")
    private String value;
    /**
     * 描述
     */
    @TableField(value = "mark")
    private String mark;
    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 设置：主键
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取：主键
     */
    public Integer getId() {
        return id;
    }

    /**
     * 设置：Key值
     */
    public void setKey(String key) {
        if (key != null) {
            if (key.trim().isEmpty()) {
                this.key = null;
            } else {
                this.key = key;
            }
        }
    }

    /**
     * 获取：Key值
     */
    public String getKey() {
        return key;
    }

    /**
     * 设置：Value值
     */
    public void setValue(String value) {
        if (StrUtil.isEmpty(value)) {
            this.value = "";
        } else {
            this.value = value;
        }
    }

    /**
     * 获取：Value值
     */
    public String getValue() {
        return value;
    }

    /**
     * 设置：描述
     */
    public void setMark(String mark) {
        if (mark != null) {
            if (mark.trim().isEmpty()) {
                this.mark = null;
            } else {
                this.mark = mark;
            }
        }
    }

    /**
     * 获取：描述
     */
    public String getMark() {
        return mark;
    }

    /**
     * 设置：创建时间
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 获取：创建时间
     */
    public Date getCreateTime() {
        return createTime;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}

